html {
  scroll-behavior: smooth;
}
:target {
  scroll-margin-top: 80px; /* 现代浏览器支持 */
}

/* 修正锚点偏移（根据头部高度调整） */
:target::before {
  content: "";
    display: block;
    height: 80px; /* 与导航栏高度一致 */
    margin: -80px 0 0;
}

.carousel {
    position: relative;
    overflow: hidden;
}
.carousel img {
    width: 100%;
    height: 100%;   
    min-height: 800px;
    animation: aniScaleBan 10s linear forwards;
    transform: scale(1.1); /* 初始放大 110% */
    animation: zoomIn 8s ease-out forwards;
    transform-origin: center center; /* 确保从中心开始缩放 */
}

@keyframes zoomIn {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.1);
        opacity: 1;
    }
}
.carousel h2 {
    position: absolute;
    top: 40%; /* 自定义最终位置 */
    left: 20%;
    transform: translateX(-50%);
    color: white;
    font-size: 3.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    opacity: 0;
    animation: slideIn 1.2s ease-out forwards;
    z-index: 2;
    /* 在h2样式中添加 */
    animation-delay: 0.5s; /* 添加动画延迟 */
    font-size: 3.5rem; /* 调整字体大小 */
    text-shadow: 3px 3px 6px rgba(0,0,0,0.7); /* 加强阴影效果 */
    letter-spacing: 2px; /* 增加字间距 */
}

 @keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-100%) translateX(-50%); /* 从上方滑入 */
    }
    to {
        opacity: 1;
        transform: translateY(0) translateX(-50%); /* 到达最终位置 */
    }
} 
.main-title {
    text-align: center;
    font-size: 32px;
    color: #333;
    margin-bottom: 40px;
    font-weight: 500;
}
.custom-icon {
    width: 24px;
    height: 24px;
    background-size: contain;
    background-repeat: no-repeat;
    transition: all 0.3s;
}

/* 为每个导航项设置不同的图标 */
.scrm-icon {
    background-image: url('https://picture-xinjuhang.oss-cn-beijing.aliyuncs.com/uploads/images/Core-product/Brand-products.png');
}

.crm-icon {
    background-image: url('https://picture-xinjuhang.oss-cn-beijing.aliyuncs.com/uploads/images/Core-product/cow.png');
}

.employee-icon {
    background-image: url('https://picture-xinjuhang.oss-cn-beijing.aliyuncs.com/uploads/images/Core-product/pig.png');
}

.service-icon {
    background-image: url('https://picture-xinjuhang.oss-cn-beijing.aliyuncs.com/uploads/images/Core-product/cow.png');
}
.nav-container-one {
    max-width: 1200px;
    margin: 40px auto 0;
    /* padding: 20px; */
}

.nav-list {
    display: flex;
    justify-content: space-around;
    list-style: none;
    /* margin-bottom: 30px; */
    padding-bottom: 20px;
    position: sticky;
    top: 0;
    background: white;
    z-index: 100;
    border-bottom: 1px solid transparent;
}
.nav-list::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background: linear-gradient(to right, 
        rgba(200, 200, 200, 0),
        rgba(200, 200, 200, 1) 50%,
        rgba(200, 200, 200, 0)
    );
}
.nav-item-two {
    cursor: pointer;
    padding: 10px 20px;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    transition: color 0.3s;
}
.nav-item-two i {
    font-size: 24px;
    color: #666;
    transition: all 0.3s;
}
/* .nav-item-two:hover {
    color: #4666e5;
} */
 /* .nav-item-two.active {
    color: #4666e5;
 } */

.nav-item-two:hover .custom-icon {
    transform: scale(1.1);
    filter: brightness(1.2);
}
.nav-item-two.active::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 2px;
    background-color: #4666e5;
}
/* .nav-item-two::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: #4666e5;
    transition: width 0.3s ease;
} */

.nav-item-two:hover::after {
    width: 70%;
}

.nav-item-two:hover i {
    color: #4666e5;
    transform: scale(1.1);
}

.content-section {
    display: none;
    margin: 40px auto;
    opacity: 0;
    /* transform: translateY(30px); */
    transform: translateX(50px);
    transition: all 0.8s ease-out;
}

.content-section.active {
    display: block;
    opacity: 1;
    transform: translateX(0);
}

.feature-container {
    display: flex;
    gap: 30px;
    margin: 20px 0;
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s ease-out;
    transition-delay: 0.2s;
}

.feature-container.active {
    opacity: 1;
    transform: translateX(0);
}

.feature-text {
    flex: 1;
    padding: 20px;
}

.feature-image {
    flex: 1;
    width: 100% ;
    height: 800px;
    background-color: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
    top: 0;
    margin-top:-80px;
}

.feature-image img {
    
    object-fit: cover;
    /* opacity: 0;
    transform: translateX(30px);
    transition: all 0.6s ease-out; */
}

/* 标题图标和高亮效果 */
.section-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.header-icon {
    font-size: 32px;
    color: #666;
    transition: all 0.3s ease;
}

/* 不同功能对应不同的图标颜色 */
.scrm-icon { color: #4666e5; }
.crm-icon { color: #42b883; }
.employee-icon { color: #f6a833; }
.service-icon { color: #fc6161; }

.content-section.active .header-icon,
.content-section.active h2 {
    color: #4666e5;
    transform: scale(1.05);
}

/* 将此CSS添加到你的Core product.css文件中 */
.animated-containers-wrapper {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 100px 20px;
    position: relative;
    z-index: 10;
}

.main-container {
    position: relative;
    width: 300px;
    height: 400px;
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
    opacity: 0;
    transform: translateY(50px);
    margin: 15px;
}

.main-container.visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.main-container:hover {
    transform: translateY(-10px);
}

.container-content {
    padding: 25px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}
.icon-container {
    width: 160px;
    height: 160px;
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    
    overflow: hidden;
}

.icon-container img {
       /* 强制高度填满容器 */
  object-fit: cover;  /* 保持比例并覆盖容器 */
  /* 移除以下两行 */
  /* max-width: 100% !important; */
  /* max-height: 100% !important; */
}

.container-content h2 {
    margin-bottom: 15px;
    color: #333;
    font-size: 22px;
}

.container-content p {
    color: #666;
    line-height: 1.6;
    font-size: 14px;
}

.popup-container {
    position: absolute;
    left: 0; /* 从 -150px 改为 0 */
    bottom: -100%; /* 从下方开始 */
    width: 100%; /* 占据父容器的全部宽度 */
    height: 100%; /* 占据父容器的全部高度 */
    background-color: rgba(52, 152, 219, 0.85); /* 半透明蓝色 */
    padding: 20px;
    color: white;
    opacity: 0;
    transition: all 0.5s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}
/* .popup-container .icon-container {
    background-color: rgba(255, 255, 255, 0.2);
} */

.main-container:hover .popup-container {
    opacity: 1;
    bottom: 0;
}

.popup-container h3 {
    margin-bottom: 10px;
    font-size: 18px;
}

.popup-container p {
    font-size: 14px;
    line-height: 1.6;
}

.main-container:hover .popup-container {
    opacity: 1;
    bottom: 0; /* 移动到容器的底部 */
    transform: translateY(0);
}

/* 每个容器的不同颜色 */
.main-container:nth-child(1) .popup-container,
.main-container:nth-child(2) .popup-container,
.main-container:nth-child(3) .popup-container {
    background-color: rgb(255, 255, 255); /* 所有弹出容器使用半透明蓝色 */
}

/* 调整feature-image样式 */
/* .feature-image {
    position: relative;
} */

/* .feature-image img {
    position: absolute;a
    top: 0;
    left: 0;
    z-index: 1;
} */

/* 响应式调整 */
@media (max-width: 768px) {
    .animated-containers-wrapper {
        flex-direction: column;
        align-items: center;
    }
    
    .main-container {
        margin-bottom: 20px;
    }
}

.product-showcase {
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 20px;
  }
  
  /* 类别容器样式 *
/* Category Container Styles */
.category-container {
  position: relative;
  width: 100%;
  margin-bottom: 80px;
  margin-top :20px; 
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.category-container.visible {
  opacity: 1;
  transform: translateY(0);
}

.category-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px 30px;
  text-align: center;
  position: relative;
  z-index: 1;
  margin-top: 20px;
}

.category-image {
  width: 100%;
  height: auto;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.category-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
}

.category-container:hover .category-image img {
  transform: scale(1.03);
}

.category-container h2 {
  font-size: 36px;
  margin-bottom: 5px;
  color: #2c3e50;
  font-weight: 700;
}

.english-subtitle {
  font-size: 18px;
  color: #7f8c8d;
  margin-bottom: 20px;
  font-style: italic;
  letter-spacing: 1px;
}

.category-description {
  max-width: 600px;
  font-size: 16px;
  color: #555;
  margin-bottom: 20px;
}

/* Products Grid Styles */
.products-grid {
  margin-top: 40px;
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.products-grid.visible {
  opacity: 1;
  transform: translateY(0);
}

/* .products-title {
  text-align: center;
  margin-bottom: 30px;
  font-size: 24px;
  color: #2c3e50;
  position: relative;
  padding-bottom: 15px;
} */

.products-title:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: #3498db;
}

.products-row {
  display: flex;
  justify-content: center;
  gap: 100px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}


  
  /* 产品项目样式 */
  .product-item {
    width: 300px;
    height: 380px;
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(30px);
  }
  
  .product-item.visible {
    opacity: 1;
    transform: translateY(0);
  }
  
  .product-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
  }
  
  .product-image {
    height: 60%;
    overflow: hidden;
  }
  
  .product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
  }
  
  .product-item:hover .product-image img {
    transform: scale(1.1);
  }
  
  .product-divider {
    height: 1px;
    background-color: #e0e0e0;
    margin: 0 15px;
  }
  
  .product-info {
    padding: 12px 15px;
    height: 40%;
  }
  
  .product-info h4 {
    font-size: 16px;
    margin-bottom: 5px;
    color: #2c3e50;
  }
  
  .product-info p {
    font-size: 12px;
    color: #7f8c8d;
  }
  
  /* 响应式调整 */
  @media (max-width: 768px) {
    .products-row {
      flex-direction: column;
      gap: 20px;
      align-items: center;
    }
    
    .category-container {
      height: auto !important;   /* 让容器高度自适应内容 */
      min-height: 0 !important;  /* 防止有最小高度限制 */
      padding-bottom: 20px;      /* 可选：底部留白更美观 */
    }
  }
  
  @media (max-width: 480px) {
    .category-container h2 {
      font-size: 28px;
    }
    
    .english-subtitle {
      font-size: 16px;
    }
  }
  /* 在about.css中添加 */
:root {
  --nav-height: 80px; /* 根据实际导航栏高度修改 */
}

/* 现代浏览器方案 */
:target {
  scroll-margin-top: var(--nav-height);
}

/* 传统浏览器兼容方案 */
:target::before {
  content: "";
  display: block;
  height: var(--nav-height);
  margin-top: calc(-1 * var(--nav-height));
  visibility: hidden;
}

/* 响应式适配 */
@media (max-width: 768px) {
  :root {
      --nav-height: 60px;
  }
}

/* 响应式媒体查询规则 */
/* 大屏幕设备 (1200px以上) */
@media screen and (min-width: 1200px) {
    .carousel h2 {
        font-size: 3.5rem;
    }
    
    .carousel .subtitle {
        font-size: 100px;
    }
    
    .nav-container-one {
        max-width: 1200px;
    }
    
    .animated-containers-wrapper {
        max-width: 1200px;
    }
    
    .product-showcase {
        max-width: 1200px;
    }
    
    .products-row {
        gap: 100px;
    }
    
    .product-item {
        width: 300px;
    }
}

/* 中等屏幕设备 (992px - 1199px) */
@media screen and (max-width: 1199px) {
    .carousel h2 {
        font-size: 3rem;
    }
    
    .carousel .subtitle {
        font-size: 80px;
    }
    
    .nav-container-one {
        max-width: 960px;
        padding: 0 20px;
    }
    
    .animated-containers-wrapper {
        max-width: 960px;
        display: ruby-text;
    }
    
    .product-showcase {
        max-width: 960px;
    }
    
    .products-row {
        gap: 60px;
    }
    
    .product-item {
        width: 280px;
    }
}

/* 平板设备 (768px - 991px) */
@media screen and (max-width: 991px) {
    .carousel {
        height: 600px;
    }
    
    .carousel h2 {
        font-size: 2.5rem;
        left: 50%;
    }
    
    .carousel .subtitle {
        font-size: 60px;
    }
    
    .nav-container-one {
        max-width: 720px;
    }
    
    .nav-list {
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }
    
    .nav-item-two {
        padding: 8px 15px;
        font-size: 16px;
    }
    
    .animated-containers-wrapper {
        max-width: 720px;
        padding: 60px 15px;
    }
    
    .main-container {
        width: 280px;
        height: 360px;
    }
    
    .product-showcase {
        max-width: 720px;
    }
    
    .products-row {
        gap: 40px;
    }
    
    .product-item {
        width: 260px;
        height: 340px;
    }
    
    .category-content h2 {
        font-size: 32px;
    }
}

/* 手机设备 (576px - 767px) */
@media screen and (max-width: 767px) {
    .carousel {
        height: 400px;
    }
    
    .carousel h2 {
        font-size: 2rem;
        top: 30%;
    }
    
    .carousel .subtitle {
        font-size: 40px;
    }
    
    .nav-container-one {
       display: none;
    }
    
    .nav-list {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .nav-item-two {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
    
    .animated-containers-wrapper {
        max-width: 540px;
        padding: 40px 10px;
        margin-top: 80px;
    }
    
    .main-container {
        width: 100%;
        max-width: 300px;
        height: 340px;
        margin: 10px 0;
    }
    
    .product-showcase {
        max-width: 540px;
    }
    
    .products-row {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }
    
    .product-item {
        width: 100%;
        max-width: 320px;
        height: 320px;
    }
    
    .category-content h2 {
        font-size: 28px;
    }
    
    .english-subtitle {
        font-size: 16px;
    }
    
    .category-container {
        height: auto !important;
        min-height: 0 !important;
        padding-bottom: 20px;
    }
}

/* 小屏手机设备 (575px以下) */
@media screen and (max-width: 575px) {
    .carousel {
        height: 300px;
    }
    
    .carousel h2 {
        font-size: 1.8rem;
        top: 25%;
    }
    
    .carousel .subtitle {
        font-size: 30px;
    }
    
    .nav-container-one {
        padding: 0 10px;
    }
    
    .nav-item-two {
        font-size: 14px;
        padding: 6px 12px;
    }
    
    .animated-containers-wrapper {
        padding: 30px 5px;
    }
    
    .main-container {
        height: 300px;
    }
    
    .icon-container {
        width: 120px;
        height: 120px;
    }
    
    .container-content h2 {
        font-size: 18px;
    }
    
    .product-showcase {
        padding: 0 10px;
    }
    
    .product-item {
        height: 280px;
    }
    
    .product-info h4 {
        font-size: 14px;
    }
    
    .product-info p {
        font-size: 12px;
    }
    
    .category-content h2 {
        font-size: 24px;
    }
    
    .english-subtitle {
        font-size: 14px;
    }
    
    .category-description {
        font-size: 14px;
    }
}

/* 通用响应式调整 */
@media screen and (max-width: 991px) {
    .feature-image {
        height: auto;
        margin-top: -40px;
    }
    
    .popup-container {
        padding: 15px;
    }
    
    .popup-container h3 {
        font-size: 16px;
    }
    
    .popup-container p {
        font-size: 12px;
    }
}

/* 确保图片在响应式布局中正确显示 */
@media screen and (max-width: 767px) {
    .product-image img {
        object-fit: contain;
    }
    
    .category-image img {
        height: auto;
    }
}